#ifndef PLUGINMAIN_H
#define PLUGINMAIN_H

#include <QObject>
#include <QPushButton>
#include "../../plugininterface.h"

class Plugin : public QObject,PluginInterface
{
    Q_OBJECT

    //导入元数据,必须要有,否则无法加载
    Q_PLUGIN_METADATA(IID pluginInterface_iid)

    //导入接口
    Q_INTERFACES(PluginInterface)

public:
    explicit Plugin(QObject *parent = nullptr);
    ~Plugin();
    void setConfig(QString conf);
    QString getName();     //必要要实现
    QIcon getIcon();
    QWidget* creactUi(QWidget *parent = 0);
    bool deleteUi();
    bool isOpenUi();

private:
    QWidget *mWidget;
    QString mConfigPath;

};

#endif // PLUGINMAIN_H
